# 1 "ipv4/fake-checksum.S"
# 37 "ipv4/fake-checksum.S"
.text
.align 4
.globl csum_partial
csum_partial:

	pushl	%eax
	pushl	%ebx
	leal	4(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+0,%ebx
	call	cacheprof_hook_Wr4
	popl	%ebx
	popl	%eax
        pushl %esi
	pushl	%eax
	pushl	%ebx
	leal	4(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+32,%ebx
	call	cacheprof_hook_Wr4
	popl	%ebx
	popl	%eax
        pushl %ebx
        movl 20(%esp),%eax # Function arg: unsigned int sum
	pushl	%eax
	pushl	%ebx
	leal	 20(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+64,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        movl 16(%esp),%ecx # Function arg: int len
	pushl	%eax
	pushl	%ebx
	leal	 16(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+96,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        movl 12(%esp),%esi # Function arg: const unsigned char *buf
	pushl	%eax
	pushl	%ebx
	leal	 12(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+128,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax


        testl $2, %esi
	pushfl
	addl	$7,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jnz 30f
10:

        movl %ecx, %edx
        movl %ecx, %ebx
        andl $0x7c, %ebx
        shrl $7, %ecx
        addl %ebx,%esi
        shrl $2, %ebx
        negl %ebx
        lea 45f(%ebx,%ebx,2), %ebx
        testl %esi, %esi
	pushfl
	addl	$10,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jmp *%ebx

        # Handle 2-byte-aligned regions

20:
	pushl	%eax
	pushl	%ebx
	leal	 (%esi), %eax
	movl	$.Lcacheprof_magic_buckets+160,%ebx
	call	cacheprof_hook_Rd2
	popl	%ebx
	popl	%eax
 addw (%esi), %ax
        lea 2(%esi), %esi
        adcl $0, %eax
	pushfl
	addl	$4,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jmp 10b

30:
 subl $2, %ecx
	pushfl
	addl	$2,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        ja 20b
	pushfl
	addl	$1,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        je 32f
        movzbl (%esi),%ebx # csumming 1 byte, 2-aligned
	pushl	%eax
	pushl	%ebx
	leal	 (%esi), %eax
	movl	$.Lcacheprof_magic_buckets+192,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        addl %ebx, %eax
        adcl $0, %eax
	pushfl
	addl	$4,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jmp 80f
32:

        addw (%esi), %ax # csumming 2 bytes, 2-aligned
	pushl	%eax
	pushl	%ebx
	leal	 (%esi), %eax
	movl	$.Lcacheprof_magic_buckets+224,%ebx
	call	cacheprof_hook_Rd2
	popl	%ebx
	popl	%eax

        adcl $0, %eax
	pushfl
	addl	$3,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jmp 80f

40:

	pushl	%eax
	pushl	%ebx
	leal	 -128(%esi), %eax
	movl	$.Lcacheprof_magic_buckets+256,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
        addl -128(%esi), %eax
        .irp p,124,120,116,112,108,104,100, 96, 92, 88, 84, 80, 76, 72, 68, 64, 60, 56, 52, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4

        adcl -\p(%esi),%eax
        .endr
45:

        lea 128(%esi), %esi
        adcl $0, %eax
        dec %ecx
	pushfl
	addl	$4,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jge 40b
        movl %edx, %ecx
	pushfl
	addl	$1,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
50:
 andl $3, %ecx
	pushfl
	addl	$2,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jz 80f

        # Handle the last 1-3 bytes without jumping

        notl %ecx # 1->2, 2->1, 3->0, higher bits are masked

        movl $0xffffff,%ebx # by the shll and shrl instructions

        shll $3,%ecx
        shrl %cl,%ebx
        andl -128(%esi),%ebx # esi is 4-aligned so should be ok
	pushl	%eax
	pushl	%ebx
	leal	 -128(%esi), %eax
	movl	$.Lcacheprof_magic_buckets+320,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        addl %ebx,%eax
        adcl $0,%eax
	pushfl
	addl	$7,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
80:

	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+352,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
        popl %ebx
	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+384,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
        popl %esi
	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+416,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
	pushfl
	addl	$3,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        ret
# 117 "ipv4/fake-checksum.S"




.align 4
.globl csum_partial_copy



# 137 "ipv4/fake-checksum.S"

csum_partial_copy:

	pushl	%eax
	pushl	%ebx
	leal	4(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+448,%ebx
	call	cacheprof_hook_Wr4
	popl	%ebx
	popl	%eax
        pushl %ebx
	pushl	%eax
	pushl	%ebx
	leal	4(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+480,%ebx
	call	cacheprof_hook_Wr4
	popl	%ebx
	popl	%eax
        pushl %edi
	pushl	%eax
	pushl	%ebx
	leal	4(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+512,%ebx
	call	cacheprof_hook_Wr4
	popl	%ebx
	popl	%eax
        pushl %esi
        movl 12+4(%esp),%esi #src
	pushl	%eax
	pushl	%ebx
	leal	 12+4(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+544,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        movl 12+8(%esp),%edi #dst
	pushl	%eax
	pushl	%ebx
	leal	 12+8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+576,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        movl 12+12(%esp),%ecx #len
	pushl	%eax
	pushl	%ebx
	leal	 12+12(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+608,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        movl 12+16(%esp),%eax #sum
	pushl	%eax
	pushl	%ebx
	leal	 12+16(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+640,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax

        movl %ecx, %edx
        movl %ecx, %ebx
        shrl $6, %ecx
        andl $0x3c, %ebx
        negl %ebx
        subl %ebx, %esi
        subl %ebx, %edi
        lea 3f(%ebx,%ebx), %ebx
        testl %esi, %esi
	pushfl
	addl	$17,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jmp *%ebx
1: addl $64,%esi
        addl $64,%edi
        movl -64(%esi), %ebx; ; addl %ebx, %eax ; movl %ebx, -64(%edi); ; movl -60(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -60(%edi); ; movl -56(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -56(%edi); ; movl -52(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -52(%edi); ;
        movl -48(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -48(%edi); ; movl -44(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -44(%edi); ; movl -40(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -40(%edi); ; movl -36(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -36(%edi); ;
        movl -32(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -32(%edi); ; movl -28(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -28(%edi); ; movl -24(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -24(%edi); ; movl -20(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -20(%edi); ;
        movl -16(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -16(%edi); ; movl -12(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -12(%edi); ; movl -8(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -8(%edi); ; movl -4(%esi), %ebx; ; adcl %ebx, %eax ; movl %ebx, -4(%edi); ;
3:
 adcl $0,%eax
        dec %ecx
	pushfl
	addl	$3,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jge 1b
4:
 andl $3, %edx
	pushfl
	addl	$2,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jz 7f
        cmpl $2, %edx
	pushfl
	addl	$2,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        jb 5f
	pushl	%eax
	pushl	%ebx
	leal	 (%esi), %eax
	movl	$.Lcacheprof_magic_buckets+1696,%ebx
	call	cacheprof_hook_Rd2
	popl	%ebx
	popl	%eax
movw (%esi), %dx;

        leal 2(%esi), %esi
	pushl	%eax
	pushl	%ebx
	leal	 (%edi), %eax
	movl	$.Lcacheprof_magic_buckets+1728,%ebx
	call	cacheprof_hook_Wr2
	popl	%ebx
	popl	%eax
movw %dx, (%edi);

        leal 2(%edi), %edi
	pushfl
	addl	$5,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        je 6f
        shll $16,%edx
	pushfl
	addl	$1,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
5:

	pushl	%eax
	pushl	%ebx
	leal	 (%esi), %eax
	movl	$.Lcacheprof_magic_buckets+1760,%ebx
	call	cacheprof_hook_Rd1
	popl	%ebx
	popl	%eax
movb (%esi), %dl;

	pushl	%eax
	pushl	%ebx
	leal	 (%edi), %eax
	movl	$.Lcacheprof_magic_buckets+1792,%ebx
	call	cacheprof_hook_Wr1
	popl	%ebx
	popl	%eax
movb %dl, (%edi);

	pushfl
	addl	$2,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
6:
 addl %edx, %eax
        adcl $0, %eax
	pushfl
	addl	$2,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
7:

	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+1824,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
        popl %esi
	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+1856,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
        popl %edi
	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+1888,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
        popl %ebx
	pushl	%eax
	pushl	%ebx
	leal	8(%esp), %eax
	movl	$.Lcacheprof_magic_buckets+1920,%ebx
	call	cacheprof_hook_Rd4
	popl	%ebx
	popl	%eax
	pushfl
	addl	$4,cacheprof_icount
	adcl	$0,4+cacheprof_icount
	popfl
        ret

	#
	# --- start of the cost centers ---
	#
	.data
	.align 4
.Lcacheprof_magic_table:
	# number of filenames, funcnames, points, cc addr
	.long 1
	.long 10
	.long 61
	.long .Lcacheprof_magic_buckets
	.asciz "unknown"
	.asciz "10(unknown)"
	.asciz "20(unknown)"
	.asciz "30(unknown)"
	.asciz "32(unknown)"
	.asciz "40(unknown)"
	.asciz "csum_partial_copy(unknown)"
	.asciz "1(unknown)"
	.asciz "3(unknown)"
	.asciz "4(unknown)"
	.asciz "6(unknown)"
.Lcacheprof_magic_buckets:
	 # (0, 0, -1)
	.long 0
	.long 0
	.long -1
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, -1)
	.long 0
	.long 0
	.long -1
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, -1)
	.long 0
	.long 0
	.long -1
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, -1)
	.long 0
	.long 0
	.long -1
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, -1)
	.long 0
	.long 0
	.long -1
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 1)
	.long 0
	.long 0
	.long 1
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 2)
	.long 0
	.long 0
	.long 2
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 3)
	.long 0
	.long 0
	.long 3
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 4)
	.long 0
	.long 0
	.long 4
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 4)
	.long 0
	.long 0
	.long 4
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 4)
	.long 0
	.long 0
	.long 4
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 4)
	.long 0
	.long 0
	.long 4
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 4)
	.long 0
	.long 0
	.long 4
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 4)
	.long 0
	.long 0
	.long 4
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 5)
	.long 0
	.long 0
	.long 5
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 6)
	.long 0
	.long 0
	.long 6
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 8)
	.long 0
	.long 0
	.long 8
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 8)
	.long 0
	.long 0
	.long 8
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 8)
	.long 0
	.long 0
	.long 8
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 8)
	.long 0
	.long 0
	.long 8
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 9)
	.long 0
	.long 0
	.long 9
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 9)
	.long 0
	.long 0
	.long 9
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 9)
	.long 0
	.long 0
	.long 9
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	 # (0, 0, 9)
	.long 0
	.long 0
	.long 9
	.long 0
	.long 0
	.long 0
	.long 0
	.long 0
	#
	# ---  end of the cost centers  ---
	#

.section .ctors,"aw"
	.long cacheprof_register2_me
.section .dtors,"aw"
	.long cacheprof_finalise2_me
	
.text
        .align 4

cacheprof_hook_Rd1:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Rd1
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_hook_Rd2:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Rd2
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_hook_Rd4:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Rd4
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret

cacheprof_hook_Rd8:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Rd8
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret

cacheprof_hook_Mo1:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Mo1
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_hook_Mo2:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Mo2
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_hook_Mo4:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Mo4
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret

cacheprof_hook_Mo8:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Mo8
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret

cacheprof_hook_Wr1:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Wr1
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_hook_Wr2:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Wr2
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_hook_Wr4:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Wr4
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret

cacheprof_hook_Wr8:
	pushl %ecx
	pushl %edx
	pushl %esi
	pushl %edi
	pushl %ebp
	pushfl
	pushl %eax         #  eax has addr referenced
	pushl %ebx         #  ebx has addr of cc
	call cacheprof_log_Wr8
	addl $8,%esp
	popfl
	popl %ebp
	popl %edi
	popl %esi
	popl %edx
	popl %ecx
	ret
	
cacheprof_register2_me:
        pushal
	pushfl
	movl $.Lcacheprof_magic_table,%eax
	pushl %eax
	call cacheprof_register2_module
	popl %eax
	popfl
	popal
	ret

cacheprof_finalise2_me:
        pushal
	pushfl
	movl $.Lcacheprof_magic_table,%eax
	pushl %eax
	call cacheprof_finalise2_module
	popl %eax
	popfl
	popal
	ret
	

